layui.use('form', function () {
    var form = layui.form;
    form.on('submit(formDemo)', function(data){
        $.ajax({
            url: "/JsProduct/advanced/shan",
            type: "POST",
            data: $("#form-process").serialize(),
            dataType: "json",
            success: function(res) {
                console.log(res)
                if (res.state == 200) {
                    alert("审核成功！");
                    parent.tableshua();
                    if(top.window['upload']){
                        top.window['upload'].frames.location.reload();
                    }
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                } else {
                    alert("审核失败！请重新审核");
                }
            }
        });
        return false;
    });
});
